package com.neusoft.neuiotms.dcam.workflow.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.neusoft.neuiotms.dcam.workflow.model.ArrivalMain;

public interface ArrivalMainRepository extends JpaRepository<ArrivalMain, Long> {

    ArrivalMain findByTaskId(String taskId);

    ArrivalMain findByWorkOrderNumAndTaskId(String workOrderNum, String taskId);

    List<ArrivalMain> findByWorkOrderNum(String workOrderNum);

    List<ArrivalMain> findAllByWorkOrderNumOrderByCreateTimeDesc(String workOrderNum);

    ArrivalMain findTopByWorkOrderNumOrderByCreateTimeDesc(String workOrderNum);
}
